package com.sright.bcard.content.dal.dao.impl;

import com.sright.bcard.common.service.share.base.dao.BaseDAOImpl;
import com.sright.bcard.common.service.share.base.dao.BaseMapper;
import com.sright.bcard.content.dal.dao.DataCardVisitNumDAO;
import com.sright.bcard.content.dal.entity.DataCardVisitNumDO;
import com.sright.bcard.content.dal.mapper.DataCardVisitNumDOMapper;
import org.springframework.stereotype.Repository;

import javax.annotation.Resource;
import java.util.Date;

@Repository
public class DataCardVisitNumDAOImpl extends BaseDAOImpl<DataCardVisitNumDO> implements DataCardVisitNumDAO {

    @Resource
    private DataCardVisitNumDOMapper dataCardVisitNumDOMapper;

    @Override
    protected BaseMapper<DataCardVisitNumDO> getObjMapper() {
        return dataCardVisitNumDOMapper;
    }

    @Override
    public DataCardVisitNumDO selectByToday(Long cardId, Long cardUserId, Date today) {
        return dataCardVisitNumDOMapper.selectByToday(cardId,cardUserId,today);
    }

    @Override
    public Integer selectSumByDate(Long userId, Date beginDate) {
        return dataCardVisitNumDOMapper.selectSumByDate(userId,beginDate);
    }
}
